package com.huilang.deme1;

public class CoffeeStore {
    public static Coffee  getCoffee(CoffeeType type) {
        switch (type) {
            case AMRK:
                return new AmericanCoffee();
            case NATTE:
                return new LatteCoffee();
            default:
                throw new RuntimeException("没有该类型咖啡");

        }
    }
}
